class Stack{
	private int maxSize;
	private char [] stackList;
	private int top;
	
	public Stack(int size){
		maxSize = size;
		stackList = new char[maxSize];
		top = -1;
	}
	
	public void push(char c){
		stackList[++top] = c;
	}
	
	public char pop(){
		return stackList[top--];
	}
	
	public boolean isEmpty(){
		return (top == -1);
	}
}